//
//  MyClipShape.swift
//  SwiftUIImage
//
//  Created by 李煜 on 2024/7/30.
//

import SwiftUI

struct MyClipShape: View {
    var body: some View {
        Image("paris")
			.resizable()
			.aspectRatio(contentMode: .fill)
			.frame(width: 300)
//			.clipShape(Circle())
//			.clipShape(.circle)
//			.clipShape(.ellipse)
			.clipShape(.capsule)
		//透明度
			.opacity(0.5)
		//重叠
			.overlay{
				Image(systemName: "heart")
					.font(.system(size: 50))
					.foregroundStyle(.black)
					.opacity(0.5)
			}
    }
}

#Preview {
    MyClipShape()
}
